package cn.wind.xboot.logic.service.impl;

import cn.wind.xboot.logic.dto.CliStoreDto;
import cn.wind.xboot.logic.dto.SubStoreDto;
import cn.wind.xboot.logic.entity.Store;
import cn.wind.xboot.logic.dao.StoreMapper;
import cn.wind.xboot.logic.service.IStoreService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 * 店铺 服务实现类
 * </p>
 *
 * @author wind
 * @since 2018-12-21
 */
@Service
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements IStoreService {

    @Override
    public IPage<CliStoreDto> findByCondition(IPage page, Map<String, Object> map) {
        return this.baseMapper.findByCondition(page,map);
    }

    @Override
    public Store findByCid(Long cId) {
        return this.baseMapper.findByCid(cId);
    }

    @Override
    public IPage<SubStoreDto> findSubStoreList(IPage page, Map<String, Object> map) {
        return this.baseMapper.findSubStoreList(page,map);
    }

    @Override
    public SubStoreDto findSubStoreInfo(Long cliId) {
        return this.baseMapper.findSubStoreInfo(cliId);
    }

    @Override
    public Store findByName(String storeName) {
        return this.baseMapper.findByName(storeName);
    }

    @Override
    public Store findByNo(String storeNo) {
        return this.baseMapper.findByNo(storeNo);
    }
}
